<%--
  Created by IntelliJ IDEA.
  User: 86178
  Date: 2022/3/26
  Time: 19:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录</title>
    <script>
        window.onload=function () {
            var elementById = document.getElementById("refresh");

            elementById.onclick=f;
            function f () {
                elementById.src="/day10_Cookie_Session/checkCode?"+new Date().getTime();

            }

        }
    </script>
</head>
<body>
<form action="loginServlet" method="post">
    <table>
        <tr>
            <td>用户名：<td>
            <td><input type="text" name="username"></td>
        </tr>
        <tr>
            <td>密码：<td>
            <td><input type="password" name="password"></td>
        </tr>
        <tr>
            <td>验证码：<td>
            <td><input type="text" name="checkCode"></td>
        </tr>
        <tr>
            <td colspan="2"><img src="/day10_Cookie_Session/checkCode" id="refresh"></td>
        </tr>
        <tr>
            <td colspan="2"><input type="submit" value="登 录" id="login"> </td>
        </tr>
    </table>
</form>
<%=request.getAttribute("user_error")==null? "":request.getAttribute("user_error")%>
</body>
</html>
